<template>
    <div class="father">
        <h1>父组件</h1>
        <Suspense>
            <template v-slot:default>
                <Child></Child>
            </template>
            <template v-slot:fallback>
                <h3>数据加载缓慢用此占位展示</h3>
            </template>
        </Suspense>
    </div>
</template>

<script setup lang="ts" name="Father">
import Child from './Child.vue'
import { Suspense } from 'vue'
</script>

<style scoped>
    .father{
        background-color: rgb(165, 164, 164);
        padding: 20px;
        border-radius: 10px;
    }
</style>